vcMessageService

vcMessageService is a service for managing messages in the application. It provides methods to add messages, clear messages, and handle message scopes.

See in: Overview

Module: vcCore

Parent: -

Children -

Referenced by: vcApplication.MessageService

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
MessageslistRGets the list of messages in the message context.
MonospaceFontFamilyStringRGets the application's default monospace font family.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
addDebugNoneException exceptionAdds a debug message with an exception to the message context.
See more
Parameters:
exception (vcException): The Python exception instance to create the message from.
addDebugNoneString header,
Exception exception
Adds a debug message with an exception to the message context.
See more
Parameters:
exception (vcException): The Python exception instance to create the message from.
addDebugNonevcLocalizable localizableAdds a debug message with a localizable text to the message context.
See more
Parameters:
localizable (vcLocalizable): The localizable text instance containing the localization key and format arguments.
addDebugNoneString messageAdds a debug message to the message context.
See more
Parameters:
message (str): The text of the message.
args (*args): Variable length argument list for formatting the message.
addErrorNoneException exceptionAdds an error message with an exception to the message context.
See more
Parameters:
exception (vcException): The Python exception instance to create the message from.
addErrorNoneString header,
Exception exception
Adds an error message with an exception to the message context.
See more
Parameters:
header (str): Header for the message.
exception (vcException): The Python exception instance to create the message from.
addErrorNonevcLocalizable localizableAdds an error message with a localizable text to the message context.
See more
Parameters:
localizable (vcLocalizable): The localizable text instance containing the localization key and format arguments.
addErrorNoneString messageAdds an error message to the message context.
See more
Parameters:
message (str): The text of the message.
args (*args): Variable length argument list for formatting the message.
addInfoNoneException exceptionAdds an info message with an exception to the message context.
See more
Parameters:
exception (vcException): The Python exception instance to create the message from.
addInfoNoneString header,
Exception exception
Adds an info message with an exception to the message context.
See more
Parameters:
header (str): Header for the message.
exception (vcException): The Python exception instance to create the message from.
addInfoNonevcLocalizable localizableAdds an info message with a localizable text to the message context.
See more
Parameters:
localizable (vcLocalizable): The localizable text instance containing the localization key and format arguments.
addInfoNoneString messageAdds an info message to the message context.
See more
Parameters:
message (str): The text of the message.
args (*args): Variable length argument list for formatting the message.
addMessageNonevcMessage messageAdds a pre-constructed message to the message context.

Parameters:
message (vcMessage): The message to be added.
addWarningNoneException exceptionAdds a warning message with an exception to the message context.
See more
Parameters:
exception (vcException): The Python exception instance to create the message from.
addWarningNoneString header,
Exception exception
Adds a warning message with an exception to the message context.
See more
Parameters:
header (str): Header for the message.
exception (vcException): The Python exception instance to create the message from.
addWarningNonevcLocalizable localizableAdds a warning message with a localizable text to the message context.
See more
Parameters:
localizable (vcLocalizable): The localizable text instance containing the localization key and format arguments.
addWarningNoneString messageAdds a warning message to the message context.
See more
Parameters:
message (str): The text of the message.
args (*args): Variable length argument list for formatting the message.
clearMessagesNoneNoneClears all messages from the message context.
createScopevcMessageScopeString text,
Optional Keyword[fontFamily = String]
Creates a new message scope with the specified text and font family.
See more
Parameters:
text (str): The text to be displayed in the message scope.
fontFamily (str): The font family to be used for the message scope. Defaults to an empty string.

Returns:
vcMessageScope: A new message scope instance.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnMessageAddedvcMessage messageThis event is triggered when a new message is added to the message context.
See more
Note, any new message added within the event handler will not trigger the event, but will be available as part of vcMessageService.Messages.

Parameters:
message (vcMessage): The added message.
OnMessagesClearedNoneThis event is triggered when all messages are cleared from the message context.